local skel = fk.CreateSkill {
  name = "lb_zero__bainiang_active&",
}

Fk:loadTranslationTable {
  ["lb_zero__bainiang_active&"] = "百酿",
  [":lb_zero__bainiang_active&"] = "你可以将一张〖百酿〗牌当【酒】使用。",

  ["#lb_zero__bainiang_active"] = "百酿：你可以将一张〖百酿〗牌当【酒】使用",
}

skel:addEffect("viewas", {
  prompt = "#lb_zero__bainiang_active",
  pattern = "analeptic",
  card_filter = function (self, player, to_select, selected, selected_targets)
    return #selected == 0 and Fk:getCardById(to_select):getMark("@@lb_zero__bainiang-inarea") ~= 0
  end,
  view_as = function (self, player, cards)
    if #cards ~= 1 then return nil end
    local card = Fk:cloneCard("analeptic")
    card:addSubcards(cards)
    card.skillName = skel.name
    return card
  end,
  before_use = function (self, player, use)
    player:broadcastSkillInvoke("lb_zero__bainiang", math.random(1, 2) + 1)
  end,
})

return skel
